<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link href="style.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="check_form.js"></script>
</head>
<body>
	
<?php

$name = $_REQUEST['name'];
$description = $_REQUEST['description'];

// Display confirmation
if ($name) {
	$goal_type = $_REQUEST['goal_type'];
	$super_goal = $_REQUEST['super_goal'];
	
	echo "<h2>Success! You've added a new goal:</h2>";
	echo "<b>Goal Name</b>: $name<br/>";
	echo "<b>Description</b>: $description<br/>";
	echo "<b>Type of Goal</b>: $goal_type<br/>";
	echo "<b>Subgoal of</b>: $super_goal<br/>";	
	echo "<hr/>";
	}

?>

<div id="wrapper">	
<!-- 	Goal/Requisite -->	
	<div class="form_heading">Add a Goal/Requisite</div>
	
	<form name="add_goal" action="add_goal.php" method="post" onsubmit="return check_goal(this)">
		Goal Name:<br/>
		<input type="text" size="50" name="name"/><br/>
		Description:<br/>
		<textarea cols="50" rows="5" name="description"></textarea><br/>
		Type of Goal:
		<input type="radio" name="goal_type" value="Major"/>Major
		<input type="radio" name="goal_type" value="Minor"/>Minor
		<input type="radio" name="goal_type" value="Neither"/>Neither<br/>
		If this is a minor goal, which major goal is it a part of?
		<select name="super_goal">
			<!-- Query DB to dispaly all goals here -->
			<option>None</option>
			<option>Some Goal</option>
		</select><br/><br/>
		<input type="submit" value="Submit"/>
	</form>
	<br/>
	<a href="index.php">Back to Main</a>
</div>	

</body>
</html>